<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Document</title>
</head>
<body>
    <script>
        // let arr = [1,2,3,4,6];

        // let obj = {
        //     name:"老王",
        //     age:18
        // }

        // XML结构
        // JSON解构

        // ES6 set数据结构  - 值不重复
        let set1 = new Set([1,2,3,4,5,5,3,2,3,4,5,1,6,7]);
        console.log(set1);

        console.log(set1.size);

        set1.add('888');
        console.log(set1);

        let bool =  set1.delete(6);
        console.log(bool);
        console.log(set1);

        let bool2 = set1.has(5);
        console.log(bool2);

        // set1.clear()
        // console.log(set1);

        let keys = set1.keys();
        let vals = set1.values();

        console.log(keys);
        console.log(vals);

        let entries = set1.entries();
        console.log(entries);

        set1.forEach(item=>{
            console.log(item);
        })

    </script>
</body>
</html>